import axios from "./httpServer"

axios.get = async function (...args: any[]) {
  if (typeof args[0] === "string") {
    args[0] = {
      url: args[0]
    }
  }
  args[0].method = "GET"
  return await axios(...args)
}

axios.post = async function (...args: any[]) {
  args[0].method = "POST"
  return await axios(...args)
}

export default axios